<template>
  <div class="dish-list">
    <h2>菜品列表</h2>
    <div class="dishes">
      <DishItem
        v-for="dish in dishes"
        :key="dish.id"
        :dish="dish"
        @click="$emit('dish-click', $event)"
      />
    </div>
  </div>
</template>

<script>
import DishItem from './DishItem'

export default {
  components: { DishItem },
  props: {
    dishes: {
      type: Array,
      required: true
    }
  }
}
</script>

<style scoped lang="scss">

</style>
